package com.example.jdbc.pattern.proxy.jdk;

import com.example.jdbc.pattern.service.impl.PrintServiceImpl;

import java.lang.reflect.Method;

/**
 * @author ：wuhong-016
 * @version v1.0.0
 * @Create : 2021/1/4 19:14
 * @Description : TODO
 **/
public class TestJdkProxy {

    public static void main(String[] args) throws Throwable{
        Object o = new JdkProxyImpl().getInstance(new PrintServiceImpl());
        Method method = o.getClass().getMethod("doPrint",String.class);
        method.invoke(o,"TestJdkProxy");
    }

}
